{if isset($reloadLink)}
{if $reloadLink!=''}
document.location.replace('{url label=productCompare listOfProducts=$reloadLink subCategoryKey=$sck}');
{else}
document.location.replace('{url}');
{/if}
{if $myListNumProducts=='' || $myListNumProducts=='0'}
document.location.replace('{url}');
{/if}
{/if}
//hideMyList();
$('#myListNumProducts').html('{if $myListNumProducts!=''}{$myListNumProducts}{else}0{/if}');
//$('#myListProducts').hide();
$('#myListProducts').html('{if $myListNumProducts==0}<div class="content"><p>{'Empty list.'|t}</p></div>{else}{foreach from=$products item=category}{foreach from=$category.values item=subCategory}<div class="subHead">{assign var=description value=$subCategory.name->getCategoryDescription()}{$description->getName()}{assign var=cdescription value=$category.name->getCategoryDescription()}<div class="links"><a href="#" rel="nofollow" class="emptyList" id="emptyList{$subCategory.name->getId()}" title="{'empty group'|t}">{'empty group'|t}</a><script type="text/javascript">{literal}$(function() {$("#emptyList{/literal}{$subCategory.name->getId()}{literal}").click(function() {$("#ajaxLoader").show(); $.post("{/literal}{url label=emptyMyList}{literal}",{subCategoryKey:"{/literal}{$subCategory.name->getSlug()}{literal}"},function(response) {eval(response); $("#ajaxLoader").hide();});return false;});});{/literal}</script><a href="http://www.facebook.com/sharer/sharer.php?u={url label=productCompare listOfProducts=$subCategory.compareLink subCategoryKey=$subCategory.name->getSlug()}&t={'Compare'|t} {$description->getName()} {$cdescription->getName()}" rel="nofollow" target="_blank" class="shareList" title="{'share group on facebook'|t}">{'share group'|t}</a><a href="{url label=productCompare listOfProducts=$subCategory.compareLink subCategoryKey=$subCategory.name->getSlug()}" class="compareProducts" title="{'compare products'|t}">{'compare products'|t}</a></div></div><div id="myListProducts" class="content">{foreach from=$subCategory.values item=product}{assign var=description value=$product->getDescription($lang_id)}<div class="productItem"><a href="{url label=productView productKey=$product->getSlug() subCategoryKey=$subCategory.name->getSlug() categoryKey=$category.name->getSlug()}" title="{$product->getName()}"><img src="{$urlStatic}/{image src=$product->getMainImage() h=310}" alt="{$description->getName()}" class="thumb"/></a>{assign var=manufacturer value=$product->getManufacturer()}<img src="{$urlStatic}/{image src=$manufacturer->getImage() h=28}" alt="{$manufacturer->getName()}" class="logo" /><h6><a href="{url label=productView productKey=$product->getSlug() subCategoryKey=$subCategory.name->getSlug() categoryKey=$category.name->getSlug()}" title="{$product->getName()}">{$product->getName()}</a></h6><a href="#" rel="nofollow" id="removeProductFromList{$product->getId()}" class="remove" title="{'remove from my list'|t}"></a><script type="text/javascript">{literal}$(function() {$("#removeProductFromList{/literal}{$product->getId()}{literal}").click(function() {$("#ajaxLoader").show(); $.post("{/literal}{url label=emptyMyList}{literal}",{productKey:"{/literal}{$product->getSlug()}{literal}"},function(response) {eval(response); $("#add2compare{/literal}{$product->getId()}{literal}").html("{/literal}{'add to compare'|t}{literal}"); $("#add2compare{/literal}{$product->getId()}{literal}").attr("title","{/literal}{'add to compare'|t}{literal}"); comparelock{/literal}{$product->getId()}{literal} = false; $("#ajaxLoader").hide(); $("#add2compare{/literal}{$product->getId()}{literal}").attr("class","add2compare"); compareLink{/literal}{$product->getId()} = "{url label=productAddToCompare productKey=$product->getSlug() subCategoryKey=$subCategory.name->getSlug() categoryKey=$category.name->getSlug()}{literal}";});return false;});});{/literal}</script></div>{/foreach}<div class="clearBoth"></div></div>{/foreach}{/foreach}{/if}');

//$('#myListProducts').show();
changeMyList();
